﻿using Sl.Upload.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sl.Upload.Help
{
    /// <summary>
    /// 上传工厂
    /// </summary>
    public class UploadFactory
    {
        /// <summary>
        /// 创建实体
        /// </summary>
        /// <returns></returns>
        public static IUpload Creater(bool isImage)
        {
            IUpload up = null;
            if (isImage)
            {
                up = new ImageUpload();
            }
            else
            {
                up = new FileUpload();
            }
            return up;
        }
    }
}
